import  info from  "../action";
function  flagReducer(state={flag:true},action){
    switch(action.type){
        case  info.CHANGEFLAG:
            return  {flag:action.payload}
        default:
            return state;
    }
}

export  const  changFlag  = (payload)=>{
    return  {
        type:info.CHANGEFLAG,
        payload
    }
}


export  default  flagReducer;